import VueRouter from 'vue-router'
import Vue from 'vue'
import Login from '@/views/Login.vue'
import Register from '@/views/Register.vue'
import Home from '@/views/Home.vue'
import Detail from '@/views/Detail.vue'
import HomeArticle from '@/views/HomeArticle.vue'
import LikeArticle from '@/views/LikeArticle.vue'
import CollectArticle from '@/views/CollectArticle.vue'
import MinePage from '@/views/MinePage.vue'
import Recommend from '@/views/Recommend.vue'
import Updated from '@/views/Updated.vue'


Vue.use(VueRouter)

const router=new VueRouter({
    routes:[
        {path:'/', component:Login},
        {path:'/login',component:Login},
        {path:'/register',component:Register},
        {
            path:'/home',component:Home,
            children:[
               {
                path:'/home/article',component:HomeArticle,
                children:[
                    {path:'/home/article/recommend',component:Recommend},
                    {path:'/home/article/updated',component:Updated}
                ]

               },
               {path:'/home/collect',component:CollectArticle},
               {path:'/home/like',component:LikeArticle},
               {path:'/home/mine',component:MinePage}
                 
            ]
        },
        // {path:'/detail:id',component:Detail},


        // 测试路径
        {path:'/detail/:id',component:Detail}

    ]
})

// 推荐 最新

export default router
